﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;

namespace TextRPG.Models.Skills
{
    public class Skill
    {
        public int SkillID { get; set; }
        public String Name { get; set; }
        public String Description { get; set; }
        public int SchoolID { get; set; }
        public virtual School School { get; set; }
        public int EquipmentLimitationID { get; set; }
        public virtual EquipmentLimitation EquipmentLimitation { get; set; }

        public bool GetAble { get; set; }
        public int SkillValue { get; set; }

        public int TargetID { get; set; }
        public virtual Target Target { get; set; }
        public int TargetAmount { get; set; }

        private int defaultValueZero = 0;

        public int ManaCostMin { get { return defaultValueZero; } set { defaultValueZero = value; } }
        public int HealthCostMin { get { return defaultValueZero; } set { defaultValueZero = value; } }
        public int StaminaCostMin { get { return defaultValueZero; } set { defaultValueZero = value; } }
        public int ManaCostMax { get { return defaultValueZero; } set { defaultValueZero = value; } }
        public int HealthCostMax { get { return defaultValueZero; } set { defaultValueZero = value; } }
        public int StaminaCostMax { get { return defaultValueZero; } set { defaultValueZero = value; } }
        public int Speed { get { return defaultValueZero; } set { defaultValueZero = value; } }

        public bool? Chaneling { get; set; }
        public int DurationMin { get { return defaultValueZero; } set { defaultValueZero = value; } }
        public int DurationMax { get { return defaultValueZero; } set { defaultValueZero = value; } }

        public int? SecondaryEffectId { get; set; }
        public virtual Skill SecondaryEffect { get; set; }
        public int? EndEffectId { get; set; }
        public virtual Skill EndEffect { get; set; }

        public int DamageMin { get { return defaultValueZero; } set { defaultValueZero = value; } }
        public int DamageMax { get { return defaultValueZero; } set { defaultValueZero = value; } }
        public int? DamageTypeSkillID { get; set; }
        public virtual DamageTypeSkill DamageType { get; set; }
        public int? DamageTargetID { get; set; }
        public virtual CharacterElement DamageTarget { get; set; }
        public int? DamageModifierID { get; set; }
        public virtual CharacterElement DamageModifier { get; set; }

        [Display(Name = "Summon")]
        public int? EnemyID { get; set; }
        public virtual Enemy Summon { get; set; }
    }
}
